﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core.Base;
using ERP.BusinessEntities;

namespace MainApp.Modules.Product
{
    public class ProductEntity: BaseEntity
    {
        SGVList<ICProductBOMsInfo> lstICProductBOMs = new SGVList<ICProductBOMsInfo>();
        SGVList<ICProductUOMsInfo> lstICProductUOMs = new SGVList<ICProductUOMsInfo>();
        SGVList<ICInvStocksInfo> lstICInvStocks = new SGVList<ICInvStocksInfo>();

        public override void InitModuleObjects()
        {
            AddMainObject("ICProducts", new ICProductsInfo());
        }

        public override void InitLists()
        {
            base.InitLists();

            lstICProductBOMs = new SGVList<ICProductBOMsInfo>();
            lstICProductBOMs.InitList(this, "ICProducts", "ICProductBOMs", "FK_ICProducts_ParentID");
            lstICProductBOMs.Binding("MainScreen", "ICProductBOMsGridView");

            lstICProductUOMs = new SGVList<ICProductUOMsInfo>();
            lstICProductUOMs.InitList(this, "ICProducts", "ICProductUOMs", "FK_ICProducts_ID");
            lstICProductUOMs.Binding("StockUOMScreen", "ICProductUOMsGridView");

            lstICInvStocks = new SGVList<ICInvStocksInfo>();
            lstICInvStocks.InitList(this, "ICProducts", "ICInvStocks", "FK_ICProducts_ID");
            lstICInvStocks.Binding("MainScreen", "ICInvStocksGridView");
        }
    }
}
